home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1999-07-13 | 12.1 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Jul 13 21:53:55 1999, modified Tue Jul 13 21:53:55 1999, creator 'CWIE', type ASCII, 11772 bytes "nodeClass.h" , at 0x2e7c 410 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 6e 6f 64 65 43 6c | 61 73 73 2e 68 00 00 00 |..nodeCl|ass.h...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 2d fc 00 | 00 01 9a b3 b1 9e 33 b3 |.....-..|......3.|
|00000060| b1 9e 33 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..3.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 fb 5d 00 00 |........|.....]..|
|00000080| 0d 23 69 66 6e 64 65 66 | 20 5f 4e 4f 44 45 43 4c |.#ifndef| _NODECL|
|00000090| 41 53 53 5f 0d 23 64 65 | 66 69 6e 65 20 5f 4e 4f |ASS_.#de|fine _NO|
|000000a0| 44 45 43 4c 41 53 53 5f | 0d 0d 23 69 66 6e 64 65 |DECLASS_|..#ifnde|
|000000b0| 66 20 4e 55 4c 4c 0d 23 | 64 65 66 69 6e 65 20 4e |f NULL.#|define N|
|000000c0| 55 4c 4c 20 30 4c 0d 23 | 65 6e 64 69 66 0d 0d 63 |ULL 0L.#|endif..c|
|000000d0| 6c 61 73 73 20 6e 6f 64 | 65 43 6c 61 73 73 3b 0d |lass nod|eClass;.|
|000000e0| 63 6c 61 73 73 20 43 45 | 67 49 53 74 72 65 61 6d |class CE|gIStream|
|000000f0| 3b 0d 63 6c 61 73 73 20 | 43 45 67 4f 53 74 72 65 |;.class |CEgOStre|
|00000100| 61 6d 3b 0d 0d 2f 2f 23 | 64 65 66 69 6e 65 20 45 |am;..//#|define E|
|00000110| 47 5f 44 45 42 55 47 0d | 0d 65 6e 75 6d 20 7b 0d |G_DEBUG.|.enum {.|
|00000120| 09 6e 6f 64 65 43 6c 61 | 73 73 54 09 09 09 09 3d |.nodeCla|ssT....=|
|00000130| 20 31 2c 0d 09 65 6e 74 | 72 79 43 6c 61 73 73 54 | 1,..ent|ryClassT|
|00000140| 09 09 09 09 3d 20 32 2c | 0d 09 43 45 67 44 62 4d |....= 2,|..CEgDbM|
|00000150| 67 72 54 09 09 09 09 3d | 20 34 2c 0d 09 43 45 67 |grT....=| 4,..CEg|
|00000160| 43 68 61 70 4d 67 72 54 | 09 09 09 09 3d 20 35 2c |ChapMgrT|....= 5,|
|00000170| 0d 09 43 50 4c 44 62 4d | 67 72 54 09 09 09 09 3d |..CPLDbM|grT....=|
|00000180| 20 36 2c 0d 09 46 64 65 | 54 09 09 09 09 09 3d 20 | 6,..Fde|T.....= |
|00000190| 37 2c 0d 09 46 71 70 54 | 09 09 09 09 09 3d 20 38 |7,..FqpT|.....= 8|
|000001a0| 2c 0d 09 46 41 74 74 72 | 69 62 75 74 65 54 09 09 |,..FAttr|ibuteT..|
|000001b0| 09 09 3d 20 39 2c 0d 09 | 46 50 61 72 61 67 72 61 |..= 9,..|FParagra|
|000001c0| 70 68 54 09 09 09 09 3d | 20 31 30 2c 0d 09 46 42 |phT....=| 10,..FB|
|000001d0| 69 74 6d 61 70 54 09 09 | 09 09 3d 20 31 31 2c 0d |itmapT..|..= 11,.|
|000001e0| 09 43 44 62 49 74 65 6d | 52 65 66 4e 6f 64 65 54 |.CDbItem|RefNodeT|
|000001f0| 09 09 09 3d 20 31 32 2c | 0d 09 43 53 74 72 4e 6f |...= 12,|..CStrNo|
|00000200| 64 65 54 09 09 09 09 3d | 20 31 33 2c 0d 09 6e 6f |deT....=| 13,..no|
|00000210| 64 65 43 6c 61 73 73 52 | 65 73 65 72 76 65 64 09 |deClassR|eserved.|
|00000220| 09 3d 20 31 34 2c 0d 09 | 46 54 61 62 54 09 09 09 |.= 14,..|FTabT...|
|00000230| 09 09 3d 20 31 35 2c 0d | 09 46 46 72 61 63 74 69 |..= 15,.|.FFracti|
|00000240| 6f 6e 54 09 09 09 09 3d | 20 31 36 2c 0d 09 46 56 |onT....=| 16,..FV|
|00000250| 65 72 74 69 63 61 6c 53 | 75 62 54 09 09 09 3d 20 |erticalS|ubT...= |
|00000260| 31 37 2c 0d 09 43 50 4c | 49 74 65 6d 54 09 09 09 |17,..CPL|ItemT...|
|00000270| 09 3d 20 39 30 2c 0d 0d | 09 63 45 67 53 75 62 45 |.= 90,..|.cEgSubE|
|00000280| 6e 64 09 09 09 09 3d 20 | 30 0d 7d 3b 0d 0d 0d 2f |nd....= |0.};.../|
|00000290| 2f 09 55 73 65 20 74 68 | 69 73 20 6d 61 63 72 6f |/.Use th|is macro|
|000002a0| 20 74 6f 20 72 65 67 69 | 73 74 65 72 20 79 6f 75 | to regi|ster you|
|000002b0| 72 20 64 65 72 69 76 65 | 64 20 6e 6f 64 65 20 63 |r derive|d node c|
|000002c0| 6c 61 73 73 20 77 69 74 | 68 20 6e 6f 64 65 43 6c |lass wit|h nodeCl|
|000002d0| 61 73 73 0d 23 64 65 66 | 69 6e 65 09 52 65 67 69 |ass.#def|ine.Regi|
|000002e0| 73 74 65 72 4e 6f 64 65 | 5f 28 20 43 6c 61 73 73 |sterNode|_( Class|
|000002f0| 4e 61 6d 65 20 29 20 54 | 4e 6f 64 65 52 65 67 69 |Name ) T|NodeRegi|
|00000300| 73 74 72 61 72 3c 43 6c | 61 73 73 4e 61 6d 65 3e |strar<Cl|assName>|
|00000310| 3a 3a 52 65 67 69 73 74 | 65 72 4e 6f 64 65 28 20 |::Regist|erNode( |
|00000320| 43 6c 61 73 73 4e 61 6d | 65 23 23 54 20 29 3b 0d |ClassNam|e##T );.|
|00000330| 0d 74 79 70 65 64 65 66 | 20 6e 6f 64 65 43 6c 61 |.typedef| nodeCla|
|00000340| 73 73 2a 09 28 2a 43 72 | 65 61 74 6f 72 46 75 6e |ss*.(*Cr|eatorFun|
|00000350| 63 54 29 28 20 6e 6f 64 | 65 43 6c 61 73 73 2a 20 |cT)( nod|eClass* |
|00000360| 69 6e 50 61 72 65 6e 74 | 20 29 3b 0d 0d 23 64 65 |inParent| );..#de|
|00000370| 66 69 6e 65 20 69 73 50 | 4c 49 74 65 6d 28 20 6e |fine isP|LItem( n|
|00000380| 6f 64 65 50 74 72 20 29 | 09 09 09 09 28 28 20 6e |odePtr )|....(( n|
|00000390| 6f 64 65 50 74 72 20 2d | 3e 20 47 65 74 54 79 70 |odePtr -|> GetTyp|
|000003a0| 65 28 29 20 3d 3d 20 39 | 30 20 29 20 3f 20 28 43 |e() == 9|0 ) ? (C|
|000003b0| 50 4c 49 74 65 6d 2a 29 | 20 6e 6f 64 65 50 74 72 |PLItem*)| nodePtr|
|000003c0| 20 3a 20 4e 55 4c 4c 29 | 0d 23 64 65 66 69 6e 65 | : NULL)|.#define|
|000003d0| 20 43 61 73 74 28 20 6e | 6f 64 65 50 74 72 2c 20 | Cast( n|odePtr, |
|000003e0| 63 6c 61 73 73 4e 61 6d | 65 20 29 09 09 28 28 20 |classNam|e )..(( |
|000003f0| 6e 6f 64 65 50 74 72 20 | 2d 3e 20 47 65 74 54 79 |nodePtr |-> GetTy|
|00000400| 70 65 28 29 20 3d 3d 20 | 63 6c 61 73 73 4e 61 6d |pe() == |classNam|
|00000410| 65 23 23 54 20 29 20 3f | 20 28 63 6c 61 73 73 4e |e##T ) ?| (classN|
|00000420| 61 6d 65 2a 29 20 6e 6f | 64 65 50 74 72 20 3a 20 |ame*) no|dePtr : |
|00000430| 4e 55 4c 4c 29 0d 0d 0d | 0d 2f 2a 09 54 68 69 73 |NULL)...|./*.This|
|00000440| 20 69 73 20 61 20 62 61 | 73 69 63 20 6c 69 73 74 | is a ba|sic list|
|00000450| 20 63 6c 61 73 73 6e 2e | 20 20 44 65 72 69 76 65 | classn.| Derive|
|00000460| 20 66 72 6f 6d 20 6e 6f | 64 65 43 6c 61 73 73 20 | from no|deClass |
|00000470| 61 6e 64 20 61 74 74 61 | 63 68 20 79 6f 75 20 64 |and atta|ch you d|
|00000480| 61 74 61 0d 2a 2f 0d 0d | 0d 63 6c 61 73 73 20 6e |ata.*/..|.class n|
|00000490| 6f 64 65 43 6c 61 73 73 | 20 7b 0d 0d 09 66 72 69 |odeClass| {...fri|
|000004a0| 65 6e 64 20 63 6c 61 73 | 73 20 58 4c 69 73 74 3b |end clas|s XList;|
|000004b0| 0d 09 0d 09 70 72 69 76 | 61 74 65 3a 0d 09 09 73 |....priv|ate:...s|
|000004c0| 74 61 74 69 63 20 6c 6f | 6e 67 09 09 09 09 09 09 |tatic lo|ng......|
|000004d0| 73 43 6c 61 73 73 49 44 | 73 5b 20 33 30 20 5d 3b |sClassID|s[ 30 ];|
|000004e0| 0d 09 09 73 74 61 74 69 | 63 20 43 72 65 61 74 6f |...stati|c Creato|
|000004f0| 72 46 75 6e 63 54 09 09 | 09 09 73 43 72 65 61 74 |rFuncT..|..sCreat|
|00000500| 6f 72 46 75 6e 63 5b 20 | 33 30 20 5d 3b 0d 09 09 |orFunc[ |30 ];...|
|00000510| 73 74 61 74 69 63 20 69 | 6e 74 09 09 09 09 09 09 |static i|nt......|
|00000520| 73 4e 75 6d 52 65 67 69 | 73 74 65 72 65 64 3b 0d |sNumRegi|stered;.|
|00000530| 0d 09 09 76 6f 69 64 09 | 09 09 09 09 09 09 69 6e |...void.|......in|
|00000540| 69 74 53 65 6c 66 28 29 | 3b 0d 09 09 0d 09 09 75 |itSelf()|;......u|
|00000550| 6e 73 69 67 6e 65 64 20 | 73 68 6f 72 74 09 09 09 |nsigned |short...|
|00000560| 09 09 6d 46 6c 61 67 73 | 3b 0d 0d 09 09 6e 6f 64 |..mFlags|;....nod|
|00000570| 65 43 6c 61 73 73 2a 20 | 09 09 09 09 09 09 6d 4e |eClass* |......mN|
|00000580| 65 78 74 3b 0d 09 09 6e | 6f 64 65 43 6c 61 73 73 |ext;...n|odeClass|
|00000590| 2a 20 09 09 09 09 09 09 | 6d 50 72 65 76 3b 09 0d |* ......|mPrev;..|
|000005a0| 09 09 6e 6f 64 65 43 6c | 61 73 73 2a 20 09 09 09 |..nodeCl|ass* ...|
|000005b0| 09 09 09 6d 50 61 72 65 | 6e 74 3b 09 09 0d 09 09 |...mPare|nt;.....|
|000005c0| 0d 09 09 6c 6f 6e 67 09 | 09 09 09 09 09 09 6d 53 |...long.|......mS|
|000005d0| 68 61 6c 6c 6f 77 43 6f | 75 6e 74 3b 09 09 09 09 |hallowCo|unt;....|
|000005e0| 09 09 0d 09 09 6c 6f 6e | 67 09 09 09 09 09 09 09 |.....lon|g.......|
|000005f0| 6d 44 65 65 70 43 6f 75 | 6e 74 3b 09 09 09 2f 2f |mDeepCou|nt;...//|
|00000600| 09 2d 31 20 69 66 20 44 | 69 72 74 79 0d 09 09 0d |.-1 if D|irty....|
|00000610| 09 09 0d 09 09 0d 09 09 | 76 69 72 74 75 61 6c 20 |........|virtual |
|00000620| 76 6f 69 64 09 09 09 09 | 09 55 70 64 61 74 65 43 |void....|.UpdateC|
|00000630| 6f 75 6e 74 73 28 20 69 | 6e 74 20 69 6e 53 68 61 |ounts( i|nt inSha|
|00000640| 6c 6c 6f 77 43 68 61 6e | 67 65 20 29 3b 0d 09 09 |llowChan|ge );...|
|00000650| 09 09 0d 09 70 72 6f 74 | 65 63 74 65 64 3a 0d 09 |....prot|ected:..|
|00000660| 09 6e 6f 64 65 43 6c 61 | 73 73 2a 09 09 09 09 09 |.nodeCla|ss*.....|
|00000670| 09 6d 48 65 61 64 3b 0d | 09 09 6e 6f 64 65 43 6c |.mHead;.|..nodeCl|
|00000680| 61 73 73 2a 09 09 09 09 | 09 09 6d 54 61 69 6c 3b |ass*....|..mTail;|
|00000690| 0d 09 09 0d 09 09 2f 2f | 09 41 63 63 65 73 73 20 |......//|.Access |
|000006a0| 74 68 69 73 20 65 6e 75 | 6d 20 74 6f 20 74 79 70 |this enu|m to typ|
|000006b0| 65 63 61 73 74 20 74 68 | 69 73 20 6e 6f 64 65 09 |ecast th|is node.|
|000006c0| 09 09 09 09 09 09 09 0d | 09 09 75 6e 73 69 67 6e |........|..unsign|
|000006d0| 65 64 20 63 68 61 72 09 | 09 09 09 09 6d 54 79 70 |ed char.|....mTyp|
|000006e0| 65 3b 09 0d 09 09 09 0d | 09 09 73 74 61 74 69 63 |e;......|..static|
|000006f0| 20 6e 6f 64 65 43 6c 61 | 73 73 2a 09 09 09 09 43 | nodeCla|ss*....C|
|00000700| 72 65 61 74 65 4e 6f 64 | 65 28 20 6c 6f 6e 67 20 |reateNod|e( long |
|00000710| 69 6e 43 6c 61 73 73 49 | 44 2c 20 6e 6f 64 65 43 |inClassI|D, nodeC|
|00000720| 6c 61 73 73 2a 20 69 6e | 50 61 72 65 6e 74 20 29 |lass* in|Parent )|
|00000730| 3b 0d 0d 0d 09 09 09 0d | 09 70 75 62 6c 69 63 3a |;.......|.public:|
|00000740| 09 0d 09 09 0d 09 09 09 | 09 09 09 09 09 09 09 6e |........|.......n|
|00000750| 6f 64 65 43 6c 61 73 73 | 28 29 3b 0d 09 09 2f 2f |odeClass|();...//|
|00000760| 09 50 6f 73 74 3a 09 43 | 6f 6e 73 74 72 75 63 74 |.Post:.C|onstruct|
|00000770| 73 20 61 20 6e 6f 64 65 | 20 61 6e 64 20 70 6c 61 |s a node| and pla|
|00000780| 63 65 73 20 74 68 65 20 | 6e 6f 64 65 20 61 74 20 |ces the |node at |
|00000790| 74 68 65 20 74 61 69 6c | 20 6f 66 20 3c 69 6e 50 |the tail| of <inP|
|000007a0| 61 72 65 6e 74 50 74 72 | 3e 0d 09 09 09 09 09 09 |arentPtr|>.......|
|000007b0| 09 09 09 09 6e 6f 64 65 | 43 6c 61 73 73 28 20 6e |....node|Class( n|
|000007c0| 6f 64 65 43 6c 61 73 73 | 2a 20 69 6e 50 61 72 65 |odeClass|* inPare|
|000007d0| 6e 74 50 74 72 20 29 3b | 09 09 09 09 0d 0d 09 09 |ntPtr );|........|
|000007e0| 2f 2f 09 50 6f 73 74 3a | 09 44 65 73 74 72 6f 79 |//.Post:|.Destroy|
|000007f0| 73 20 74 68 69 73 20 6e | 6f 64 65 20 61 6e 64 20 |s this n|ode and |
|00000800| 61 6c 6c 20 73 75 62 20 | 69 74 65 6d 73 20 69 6e |all sub |items in|
|00000810| 73 69 64 65 20 69 74 0d | 09 09 76 69 72 74 75 61 |side it.|..virtua|
|00000820| 6c 09 09 09 09 09 09 09 | 7e 6e 6f 64 65 43 6c 61 |l.......|~nodeCla|
|00000830| 73 73 28 29 3b 0d 09 09 | 0d 09 09 69 6e 6c 69 6e |ss();...|...inlin|
|00000840| 65 20 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 09 |e unsign|ed char.|
|00000850| 09 09 47 65 74 54 79 70 | 65 28 29 20 63 6f 6e 73 |..GetTyp|e() cons|
|00000860| 74 09 09 09 09 09 09 09 | 09 09 7b 20 72 65 74 75 |t.......|..{ retu|
|00000870| 72 6e 20 6d 54 79 70 65 | 3b 09 7d 0d 09 09 0d 09 |rn mType|;.}.....|
|00000880| 09 2f 2f 09 50 6f 73 74 | 3a 09 54 68 69 73 20 69 |.//.Post|:.This i|
|00000890| 73 20 68 6f 77 20 6e 6f | 64 65 43 6c 61 73 73 20 |s how no|deClass |
|000008a0| 22 6b 6e 6f 77 73 22 20 | 77 68 61 74 20 6b 69 6e |"knows" |what kin|
|000008b0| 64 20 6f 66 20 6e 6f 64 | 65 43 6c 61 73 73 20 74 |d of nod|eClass t|
|000008c0| 6f 20 69 6e 73 74 61 6e | 74 69 61 74 65 20 77 68 |o instan|tiate wh|
|000008d0| 65 6e 20 69 74 20 72 65 | 61 64 73 20 61 6e 20 49 |en it re|ads an I|
|000008e0| 44 20 66 72 6f 6d 20 61 | 20 73 74 72 65 61 6d 2e |D from a| stream.|
|000008f0| 0d 09 09 73 74 61 74 69 | 63 20 76 6f 69 64 09 09 |...stati|c void..|
|00000900| 09 09 09 09 52 65 67 69 | 73 74 65 72 4e 6f 64 65 |....Regi|sterNode|
|00000910| 43 6c 61 73 73 28 20 6c | 6f 6e 67 20 69 6e 49 44 |Class( l|ong inID|
|00000920| 2c 20 43 72 65 61 74 6f | 72 46 75 6e 63 54 20 69 |, Creato|rFuncT i|
|00000930| 6e 43 72 65 61 74 6f 72 | 46 75 6e 63 20 29 3b 0d |nCreator|Func );.|
|00000940| 0d 0d 09 09 2f 2f 09 50 | 6f 73 74 3a 09 52 65 74 |....//.P|ost:.Ret|
|00000950| 75 72 6e 73 20 61 20 72 | 61 6e 64 6f 6d 20 6e 75 |urns a r|andom nu|
|00000960| 6d 62 65 72 20 66 72 6f | 6d 20 3c 6d 69 6e 3e 20 |mber fro|m <min> |
|00000970| 74 6f 20 3c 6d 61 78 3e | 2c 20 69 6e 63 6c 75 73 |to <max>|, inclus|
|00000980| 69 76 65 2e 0d 09 09 73 | 74 61 74 69 63 20 6c 6f |ive....s|tatic lo|
|00000990| 6e 67 20 09 09 09 09 09 | 52 6e 64 28 20 6c 6f 6e |ng .....|Rnd( lon|
|000009a0| 67 20 6d 69 6e 2c 20 6c | 6f 6e 67 20 6d 61 78 20 |g min, l|ong max |
|000009b0| 29 3b 0d 0d 0d 09 09 23 | 69 66 64 65 66 20 45 47 |);.....#|ifdef EG|
|000009c0| 5f 44 45 42 55 47 0d 09 | 09 6e 6f 64 65 43 6c 61 |_DEBUG..|.nodeCla|
|000009d0| 73 73 2a 09 09 09 09 09 | 09 6d 4e 65 78 74 44 65 |ss*.....|.mNextDe|
|000009e0| 62 75 67 3b 0d 09 09 73 | 74 61 74 69 63 20 6e 6f |bug;...s|tatic no|
|000009f0| 64 65 43 6c 61 73 73 2a | 09 09 09 09 73 46 69 72 |deClass*|....sFir|
|00000a00| 73 74 44 65 62 75 67 3b | 0d 09 09 73 74 61 74 69 |stDebug;|...stati|
|00000a10| 63 20 6c 6f 6e 67 09 09 | 09 09 09 09 73 43 61 63 |c long..|....sCac|
|00000a20| 68 65 48 69 74 73 41 3b | 0d 09 09 73 74 61 74 69 |heHitsA;|...stati|
|00000a30| 63 20 6c 6f 6e 67 09 09 | 09 09 09 09 73 43 61 63 |c long..|....sCac|
|00000a40| 68 65 48 69 74 73 42 3b | 0d 09 09 73 74 61 74 69 |heHitsB;|...stati|
|00000a50| 63 20 6c 6f 6e 67 09 09 | 09 09 09 09 73 43 61 63 |c long..|....sCac|
|00000a60| 68 65 54 72 79 73 41 3b | 0d 09 09 73 74 61 74 69 |heTrysA;|...stati|
|00000a70| 63 20 6c 6f 6e 67 09 09 | 09 09 09 09 73 43 61 63 |c long..|....sCac|
|00000a80| 68 65 54 72 79 73 42 3b | 0d 09 09 73 74 61 74 69 |heTrysB;|...stati|
|00000a90| 63 20 6c 6f 6e 67 09 09 | 09 09 09 09 73 43 61 63 |c long..|....sCac|
|00000aa0| 68 65 48 69 74 73 43 3b | 0d 09 09 73 74 61 74 69 |heHitsC;|...stati|
|00000ab0| 63 20 6c 6f 6e 67 09 09 | 09 09 09 09 73 43 61 63 |c long..|....sCac|
|00000ac0| 68 65 54 72 79 73 43 3b | 0d 09 09 73 74 61 74 69 |heTrysC;|...stati|
|00000ad0| 63 20 76 6f 69 64 09 09 | 09 09 09 09 44 65 62 75 |c void..|....Debu|
|00000ae0| 67 42 72 65 61 6b 28 29 | 3b 0d 09 09 23 65 6e 64 |gBreak()|;...#end|
|00000af0| 69 66 0d 0d 09 09 2f 2f | 09 50 6f 73 74 3a 09 41 |if....//|.Post:.A|
|00000b00| 6c 6c 20 73 75 62 20 6e | 6f 64 65 73 20 28 61 74 |ll sub n|odes (at|
|00000b10| 20 61 6e 79 20 64 65 70 | 74 68 29 20 74 68 61 74 | any dep|th) that|
|00000b20| 20 61 72 65 20 73 65 6c | 65 63 74 65 64 20 61 72 | are sel|ected ar|
|00000b30| 65 20 64 65 6c 65 74 65 | 64 2e 20 20 49 66 20 61 |e delete|d. If a|
|00000b40| 20 6e 6f 64 65 20 69 73 | 20 73 65 6c 65 63 74 65 | node is| selecte|
|00000b50| 64 2c 20 69 74 73 20 63 | 6f 6e 74 65 6e 74 73 20 |d, its c|ontents |
|00000b60| 61 72 65 20 70 6c 61 63 | 65 64 20 61 74 20 74 68 |are plac|ed at th|
|00000b70| 65 20 73 61 6d 65 0d 09 | 09 2f 2f 09 09 09 6c 65 |e same..|.//...le|
|00000b80| 76 65 6c 20 6f 66 20 74 | 68 69 73 20 61 6e 64 20 |vel of t|his and |
|00000b90| 74 68 69 73 20 69 73 20 | 74 68 65 6e 20 64 65 6c |this is |then del|
|00000ba0| 65 74 65 64 2e 0d 09 09 | 76 69 72 74 75 61 6c 20 |eted....|virtual |
|00000bb0| 76 6f 69 64 09 09 09 09 | 09 44 65 6c 65 74 65 53 |void....|.DeleteS|
|00000bc0| 65 6c 65 63 74 65 64 28 | 29 3b 0d 09 09 0d 09 09 |elected(|);......|
|00000bd0| 69 6e 6c 69 6e 65 20 76 | 6f 69 64 09 09 09 09 09 |inline v|oid.....|
|00000be0| 09 53 65 6c 65 63 74 28 | 29 09 09 09 09 09 09 09 |.Select(|).......|
|00000bf0| 09 09 09 7b 20 6d 46 6c | 61 67 73 20 3d 20 6d 46 |...{ mFl|ags = mF|
|00000c00| 6c 61 67 73 20 7c 20 30 | 78 31 3b 09 09 7d 0d 09 |lags | 0|x1;..}..|
|00000c10| 09 69 6e 6c 69 6e 65 20 | 76 6f 69 64 09 09 09 09 |.inline |void....|
|00000c20| 09 09 55 6e 73 65 6c 65 | 63 74 28 29 09 09 09 09 |..Unsele|ct()....|
|00000c30| 09 09 09 09 09 09 7b 20 | 6d 46 6c 61 67 73 20 3d |......{ |mFlags =|
|00000c40| 20 6d 46 6c 61 67 73 20 | 26 20 30 78 46 46 46 45 | mFlags |& 0xFFFE|
|00000c50| 3b 09 09 7d 0d 09 09 69 | 6e 6c 69 6e 65 20 62 6f |;..}...i|nline bo|
|00000c60| 6f 6c 09 09 09 09 09 09 | 49 73 53 65 6c 65 63 74 |ol......|IsSelect|
|00000c70| 65 64 28 29 20 63 6f 6e | 73 74 09 09 09 09 09 09 |ed() con|st......|
|00000c80| 09 09 7b 20 72 65 74 75 | 72 6e 20 6d 46 6c 61 67 |..{ retu|rn mFlag|
|00000c90| 73 20 26 20 30 78 31 3b | 20 7d 0d 09 09 76 6f 69 |s & 0x1;| }...voi|
|00000ca0| 64 09 09 09 09 09 09 09 | 53 65 74 53 65 6c 65 63 |d.......|SetSelec|
|00000cb0| 74 65 64 28 20 62 6f 6f | 6c 20 69 6e 49 73 53 65 |ted( boo|l inIsSe|
|00000cc0| 6c 65 63 74 65 64 20 29 | 09 09 09 09 7b 20 69 66 |lected )|....{ if|
|00000cd0| 20 28 20 69 6e 49 73 53 | 65 6c 65 63 74 65 64 20 | ( inIsS|elected |
|00000ce0| 29 20 53 65 6c 65 63 74 | 28 29 3b 20 65 6c 73 65 |) Select|(); else|
|00000cf0| 20 55 6e 73 65 6c 65 63 | 74 28 29 3b 20 7d 0d 0d | Unselec|t(); }..|
|00000d00| 0d 09 09 0d 09 09 2f 2f | 09 50 6f 73 74 3a 09 41 |......//|.Post:.A|
|00000d10| 6c 6c 6f 77 73 20 63 6c | 69 65 6e 74 20 77 72 69 |llows cl|ient wri|
|00000d20| 74 65 20 61 63 63 65 73 | 73 20 74 6f 20 76 61 72 |te acces|s to var|
|00000d30| 69 6f 75 73 20 62 6f 6f | 6c 65 61 6e 20 66 6c 61 |ious boo|lean fla|
|00000d40| 67 73 2e 0d 09 09 2f 2f | 09 4e 6f 74 65 3a 09 49 |gs....//|.Note:.I|
|00000d50| 66 20 3c 69 6e 46 6c 61 | 67 4e 75 6d 3e 20 69 73 |f <inFla|gNum> is|
|00000d60| 20 3c 20 31 20 6f 72 20 | 3e 20 39 2c 20 6e 6f 74 | < 1 or |> 9, not|
|00000d70| 68 69 6e 67 20 6f 63 63 | 75 72 73 2e 09 09 09 0d |hing occ|urs.....|
|00000d80| 09 09 76 6f 69 64 09 09 | 09 09 09 09 09 53 65 74 |..void..|.....Set|
|00000d90| 46 6c 61 67 28 20 75 6e | 73 69 67 6e 65 64 20 69 |Flag( un|signed i|
|00000da0| 6e 74 20 69 6e 46 6c 61 | 67 4e 75 6d 2c 20 62 6f |nt inFla|gNum, bo|
|00000db0| 6f 6c 20 69 6e 56 61 6c | 20 29 3b 0d 09 09 0d 09 |ol inVal| );.....|
|00000dc0| 09 2f 2f 09 50 6f 73 74 | 3a 09 41 6c 6c 6f 77 73 |.//.Post|:.Allows|
|00000dd0| 20 63 6c 69 65 6e 74 20 | 72 65 61 64 20 61 63 63 | client |read acc|
|00000de0| 65 73 73 20 74 6f 20 76 | 61 72 69 6f 75 73 20 62 |ess to v|arious b|
|00000df0| 6f 6f 6c 65 61 6e 20 66 | 6c 61 67 73 2e 0d 09 09 |oolean f|lags....|
|00000e00| 2f 2f 09 4e 6f 74 65 3a | 09 49 66 20 3c 69 6e 46 |//.Note:|.If <inF|
|00000e10| 6c 61 67 4e 75 6d 3e 20 | 69 73 20 3c 20 31 20 6f |lagNum> |is < 1 o|
|00000e20| 72 20 3e 20 39 2c 20 66 | 61 6c 73 65 20 69 73 20 |r > 9, f|alse is |
|00000e30| 72 65 74 75 72 6e 65 64 | 2e 09 09 0d 09 09 62 6f |returned|......bo|
|00000e40| 6f 6c 09 09 09 09 09 09 | 09 47 65 74 46 6c 61 67 |ol......|.GetFlag|
|00000e50| 28 20 75 6e 73 69 67 6e | 65 64 20 69 6e 74 20 69 |( unsign|ed int i|
|00000e60| 6e 46 6c 61 67 4e 75 6d | 20 29 20 63 6f 6e 73 74 |nFlagNum| ) const|
|00000e70| 3b 0d 0d 09 09 2f 2f 09 | 50 6f 73 74 3a 09 54 68 |;....//.|Post:.Th|
|00000e80| 69 73 20 6e 6f 64 65 20 | 61 6e 64 20 61 6c 6c 20 |is node |and all |
|00000e90| 73 75 62 20 6e 6f 64 65 | 73 20 28 61 6e 64 20 74 |sub node|s (and t|
|00000ea0| 68 65 69 72 20 73 75 62 | 20 6e 6f 64 65 73 2c 20 |heir sub| nodes, |
|00000eb0| 65 74 63 29 20 61 72 65 | 20 75 6e 2f 73 65 6c 65 |etc) are| un/sele|
|00000ec0| 63 74 65 64 20 77 69 74 | 68 20 3c 69 6e 53 65 6c |cted wit|h <inSel|
|00000ed0| 65 63 74 65 64 3e 2e 0d | 09 09 76 6f 69 64 09 09 |ected>..|..void..|
|00000ee0| 09 09 09 09 09 53 65 74 | 54 72 65 65 53 65 6c 65 |.....Set|TreeSele|
|00000ef0| 63 74 65 64 28 20 62 6f | 6f 6c 20 69 6e 53 65 6c |cted( bo|ol inSel|
|00000f00| 65 63 74 65 64 20 29 3b | 0d 09 09 0d 09 09 2f 2f |ected );|......//|
|00000f10| 09 50 6f 73 74 3a 09 52 | 65 74 75 72 6e 73 20 61 |.Post:.R|eturns a|
|00000f20| 6e 20 61 73 73 6f 63 69 | 61 74 65 64 20 75 6e 69 |n associ|ated uni|
|00000f30| 71 75 65 20 6f 72 20 68 | 61 73 68 20 66 6f 72 20 |que or h|ash for |
|00000f40| 74 68 65 20 6e 6f 64 65 | 2e 20 20 0d 09 09 2f 2f |the node|. ...//|
|00000f50| 09 4e 6f 74 65 3a 09 54 | 68 69 73 20 69 73 20 68 |.Note:.T|his is h|
|00000f60| 6f 77 20 58 4c 69 73 74 | 20 6b 6e 6f 77 73 20 77 |ow XList| knows w|
|00000f70| 68 61 74 20 6f 72 64 65 | 72 20 74 6f 20 73 6f 72 |hat orde|r to sor|
|00000f80| 74 20 6e 6f 64 65 73 2c | 20 69 66 20 74 68 61 74 |t nodes,| if that|
|00000f90| 20 6f 70 74 69 6f 6e 20 | 69 73 20 65 6e 61 62 6c | option |is enabl|
|00000fa0| 65 64 2e 0d 09 09 76 69 | 72 74 75 61 6c 20 6c 6f |ed....vi|rtual lo|
|00000fb0| 6e 67 09 09 09 09 09 47 | 65 74 4b 65 79 28 29 09 |ng.....G|etKey().|
|00000fc0| 09 09 09 09 09 09 09 09 | 09 7b 20 72 65 74 75 72 |........|.{ retur|
|00000fd0| 6e 20 30 3b 09 09 09 09 | 09 09 7d 0d 09 09 0d 09 |n 0;....|..}.....|
|00000fe0| 09 2f 2f 09 50 6f 73 74 | 3a 09 54 68 65 20 6e 6f |.//.Post|:.The no|
|00000ff0| 64 65 20 69 73 20 64 65 | 74 61 63 68 65 64 20 66 |de is de|tached f|
|00001000| 72 6f 6d 20 69 74 27 73 | 20 70 61 72 65 6e 74 2e |rom it's| parent.|
|00001010| 20 20 4f 62 76 69 6f 75 | 73 6c 79 2c 20 74 68 65 | Obviou|sly, the|
|00001020| 20 63 61 6c 6c 65 72 20 | 6e 6f 77 20 61 73 73 75 | caller |now assu|
|00001030| 6d 65 73 20 6f 77 6e 65 | 72 73 68 69 70 20 6f 66 |mes owne|rship of|
|00001040| 20 74 68 65 20 6e 6f 64 | 65 2e 0d 09 09 76 6f 69 | the nod|e....voi|
|00001050| 64 20 09 09 09 09 09 09 | 09 64 65 74 61 63 68 28 |d ......|.detach(|
|00001060| 29 3b 0d 09 09 0d 09 09 | 2f 2f 09 50 6f 73 74 3a |);......|//.Post:|
|00001070| 09 54 68 69 73 20 6e 6f | 64 65 20 69 73 20 69 6e |.This no|de is in|
|00001080| 73 65 72 74 65 64 20 69 | 6e 20 3c 69 6e 50 72 65 |serted i|n <inPre|
|00001090| 76 4e 6f 64 65 3e 27 73 | 20 70 61 72 65 6e 74 20 |vNode>'s| parent |
|000010a0| 6c 69 73 74 20 66 6f 6c | 6c 6f 77 69 6e 67 20 3c |list fol|lowing <|
|000010b0| 69 6e 50 72 65 76 4e 6f | 64 65 3e 20 69 6e 20 74 |inPrevNo|de> in t|
|000010c0| 68 65 20 6c 69 73 74 20 | 6f 72 64 65 72 0d 09 09 |he list |order...|
|000010d0| 76 6f 69 64 09 09 09 09 | 09 09 09 69 6e 73 65 72 |void....|...inser|
|000010e0| 74 41 66 74 65 72 28 20 | 6e 6f 64 65 43 6c 61 73 |tAfter( |nodeClas|
|000010f0| 73 2a 20 69 6e 50 72 65 | 76 4e 6f 64 65 20 29 3b |s* inPre|vNode );|
|00001100| 0d 09 09 0d 09 09 2f 2f | 09 50 6f 73 74 3a 09 49 |......//|.Post:.I|
|00001110| 66 20 3c 69 6e 41 66 74 | 65 72 4e 6f 64 65 3e 20 |f <inAft|erNode> |
|00001120| 3c 3d 20 30 2c 20 3c 69 | 6e 4e 6f 64 65 54 6f 41 |<= 0, <i|nNodeToA|
|00001130| 64 64 3e 20 69 73 20 61 | 64 64 65 64 20 61 74 20 |dd> is a|dded at |
|00001140| 74 68 69 73 27 20 68 65 | 61 64 2e 0d 09 09 2f 2f |this' he|ad....//|
|00001150| 09 09 09 49 66 20 30 20 | 3c 20 3c 69 6e 41 66 74 |...If 0 |< <inAft|
|00001160| 65 72 4e 6f 64 65 3e 20 | 3c 3d 20 64 65 65 70 43 |erNode> |<= deepC|
|00001170| 6f 75 6e 74 28 29 2c 20 | 3c 69 6e 4e 6f 64 65 54 |ount(), |<inNodeT|
|00001180| 6f 41 64 64 3e 20 69 73 | 20 61 64 64 65 64 20 61 |oAdd> is| added a|
|00001190| 66 74 65 72 20 74 68 65 | 20 3c 69 6e 41 66 74 65 |fter the| <inAfte|
|000011a0| 72 4e 6f 64 65 3e 20 69 | 74 65 6d 2e 0d 09 09 2f |rNode> i|tem..../|
|000011b0| 2f 09 09 09 49 66 20 3c | 69 6e 41 66 74 65 72 4e |/...If <|inAfterN|
|000011c0| 6f 64 65 3e 20 3e 20 64 | 65 65 70 43 6f 75 6e 74 |ode> > d|eepCount|
|000011d0| 28 29 2c 20 3c 69 6e 4e | 6f 64 65 54 6f 41 64 64 |(), <inN|odeToAdd|
|000011e0| 3e 20 69 73 20 61 64 64 | 65 64 20 61 74 20 74 68 |> is add|ed at th|
|000011f0| 69 73 27 20 74 61 69 6c | 2e 09 0d 09 09 76 6f 69 |is' tail|.....voi|
|00001200| 64 09 09 09 09 09 09 09 | 69 6e 73 65 72 74 41 66 |d.......|insertAf|
|00001210| 74 65 72 28 20 6c 6f 6e | 67 20 69 6e 41 66 74 65 |ter( lon|g inAfte|
|00001220| 72 4e 6f 64 65 2c 20 6e | 6f 64 65 43 6c 61 73 73 |rNode, n|odeClass|
|00001230| 2a 20 69 6e 4e 6f 64 65 | 54 6f 41 64 64 20 29 3b |* inNode|ToAdd );|
|00001240| 0d 0d 09 09 2f 2f 20 09 | 54 68 65 20 66 6f 6c 6c |....// .|The foll|
|00001250| 6f 77 69 6e 67 20 61 72 | 65 20 75 73 65 66 75 6c |owing ar|e useful|
|00001260| 20 66 6f 72 20 73 65 74 | 74 69 6e 67 20 75 70 20 | for set|ting up |
|00001270| 6c 6f 6f 70 73 2c 20 65 | 74 63 0d 09 09 69 6e 6c |loops, e|tc...inl|
|00001280| 69 6e 65 20 6e 6f 64 65 | 43 6c 61 73 73 2a 20 09 |ine node|Class* .|
|00001290| 09 09 09 47 65 74 4e 65 | 78 74 28 29 20 63 6f 6e |...GetNe|xt() con|
|000012a0| 73 74 09 09 09 09 09 09 | 09 09 09 7b 20 72 65 74 |st......|...{ ret|
|000012b0| 75 72 6e 20 6d 4e 65 78 | 74 3b 09 09 09 09 09 7d |urn mNex|t;.....}|
|000012c0| 0d 09 09 69 6e 6c 69 6e | 65 20 6e 6f 64 65 43 6c |...inlin|e nodeCl|
|000012d0| 61 73 73 2a 20 09 09 09 | 09 47 65 74 50 72 65 76 |ass* ...|.GetPrev|
|000012e0| 28 29 20 63 6f 6e 73 74 | 09 09 09 09 09 09 09 09 |() const|........|
|000012f0| 09 7b 20 72 65 74 75 72 | 6e 20 6d 50 72 65 76 3b |.{ retur|n mPrev;|
|00001300| 09 09 09 09 09 7d 0d 09 | 09 69 6e 6c 69 6e 65 20 |.....}..|.inline |
|00001310| 6e 6f 64 65 43 6c 61 73 | 73 2a 09 09 09 09 47 65 |nodeClas|s*....Ge|
|00001320| 74 50 61 72 65 6e 74 28 | 29 20 63 6f 6e 73 74 09 |tParent(|) const.|
|00001330| 09 09 09 09 09 09 09 7b | 20 72 65 74 75 72 6e 20 |.......{| return |
|00001340| 6d 50 61 72 65 6e 74 3b | 09 09 09 09 7d 0d 09 09 |mParent;|....}...|
|00001350| 69 6e 6c 69 6e 65 20 6e | 6f 64 65 43 6c 61 73 73 |inline n|odeClass|
|00001360| 2a 20 09 09 09 09 47 65 | 74 54 61 69 6c 28 29 20 |* ....Ge|tTail() |
|00001370| 63 6f 6e 73 74 09 09 09 | 09 09 09 09 09 09 7b 20 |const...|......{ |
|00001380| 72 65 74 75 72 6e 20 6d | 54 61 69 6c 3b 09 09 09 |return m|Tail;...|
|00001390| 09 09 7d 0d 09 09 69 6e | 6c 69 6e 65 20 6e 6f 64 |..}...in|line nod|
|000013a0| 65 43 6c 61 73 73 2a 20 | 09 09 09 09 47 65 74 48 |eClass* |....GetH|
|000013b0| 65 61 64 28 29 20 63 6f | 6e 73 74 09 09 09 09 09 |ead() co|nst.....|
|000013c0| 09 09 09 09 7b 20 72 65 | 74 75 72 6e 20 6d 48 65 |....{ re|turn mHe|
|000013d0| 61 64 3b 09 09 09 09 09 | 7d 0d 0d 09 09 2f 2f 09 |ad;.....|}....//.|
|000013e0| 50 6f 73 74 3a 09 52 65 | 74 75 72 6e 73 20 74 68 |Post:.Re|turns th|
|000013f0| 65 20 6e 6f 64 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |e node f|ollowing|
|00001400| 20 74 68 69 73 20 68 65 | 69 72 61 72 63 68 61 6c | this he|irarchal|
|00001410| 79 2e 0d 09 09 2f 2f 09 | 50 6f 73 74 3a 20 09 54 |y....//.|Post: .T|
|00001420| 68 65 20 6e 6f 64 65 20 | 72 65 74 75 72 6e 65 64 |he node |returned|
|00001430| 20 77 69 6c 6c 20 68 61 | 76 65 20 3c 69 6e 43 65 | will ha|ve <inCe|
|00001440| 69 6c 69 6e 67 3e 20 61 | 73 20 61 20 73 75 70 65 |iling> a|s a supe|
|00001450| 72 2d 70 61 72 65 6e 74 | 2e 0d 09 09 2f 2a 09 53 |r-parent|..../*.S|
|00001460| 61 6d 70 6c 65 3a 09 09 | 09 20 20 31 09 09 09 09 |ample:..|. 1....|
|00001470| 28 6c 65 66 74 77 61 72 | 64 20 69 73 20 74 68 65 |(leftwar|d is the|
|00001480| 20 6d 48 65 61 64 29 0d | 09 09 09 09 09 09 09 2f | mHead).|......./|
|00001490| 09 5c 0d 09 09 09 09 09 | 09 20 20 32 09 09 36 0d |.\......|. 2..6.|
|000014a0| 09 09 09 09 09 09 2f 09 | 5c 0d 09 09 09 09 09 09 |....../.|\.......|
|000014b0| 33 09 34 0d 09 09 09 09 | 09 09 09 7c 0d 09 09 09 |3.4.....|...|....|
|000014c0| 09 09 09 09 35 09 0d 09 | 09 09 09 09 09 0d 09 09 |....5...|........|
|000014d0| 09 76 6f 69 64 20 66 28 | 20 6e 6f 64 65 43 6c 61 |.void f(| nodeCla|
|000014e0| 73 73 2a 20 63 65 69 6c | 69 6e 67 20 29 20 7b 0d |ss* ceil|ing ) {.|
|000014f0| 09 09 09 09 6e 6f 64 65 | 20 3d 20 63 65 69 6c 69 |....node| = ceili|
|00001500| 6e 67 3b 0d 09 09 09 09 | 77 68 69 6c 65 20 28 20 |ng;.....|while ( |
|00001510| 6e 6f 64 65 20 21 3d 20 | 4e 55 4c 4c 20 29 20 7b |node != |NULL ) {|
|00001520| 0d 09 09 09 09 09 70 72 | 69 6e 74 28 20 6e 6f 64 |......pr|int( nod|
|00001530| 65 20 29 3b 0d 09 09 09 | 09 09 6e 6f 64 65 20 3d |e );....|..node =|
|00001540| 20 6e 6f 64 65 20 2d 3e | 20 4e 65 78 74 49 6e 43 | node ->| NextInC|
|00001550| 68 61 69 6e 28 20 63 65 | 69 6c 69 6e 67 20 29 0d |hain( ce|iling ).|
|00001560| 09 09 09 09 7d 0d 09 09 | 09 7d 0d 09 09 09 0d 09 |....}...|.}......|
|00001570| 09 09 4f 75 74 70 75 74 | 20 6f 66 20 66 28 31 29 |..Output| of f(1)|
|00001580| 3a 09 32 2c 20 33 2c 20 | 34 2c 20 35 2c 20 36 09 |:.2, 3, |4, 5, 6.|
|00001590| 09 09 09 09 09 09 09 09 | 0d 09 09 09 4f 75 74 70 |........|....Outp|
|000015a0| 75 74 20 6f 66 20 66 28 | 32 29 3a 09 33 2c 20 34 |ut of f(|2):.3, 4|
|000015b0| 2c 20 35 09 09 09 09 09 | 09 2a 2f 0d 09 09 6e 6f |, 5.....|.*/...no|
|000015c0| 64 65 43 6c 61 73 73 2a | 09 09 09 09 09 09 4e 65 |deClass*|......Ne|
|000015d0| 78 74 49 6e 43 68 61 69 | 6e 28 20 63 6f 6e 73 74 |xtInChai|n( const|
|000015e0| 20 6e 6f 64 65 43 6c 61 | 73 73 2a 20 69 6e 43 65 | nodeCla|ss* inCe|
|000015f0| 69 6c 69 6e 67 20 29 20 | 63 6f 6e 73 74 3b 0d 09 |iling ) |const;..|
|00001600| 09 0d 09 09 2f 2f 09 50 | 6f 73 74 3a 09 54 68 65 |....//.P|ost:.The|
|00001610| 20 69 6e 76 65 72 73 65 | 20 66 63 6e 20 6f 66 20 | inverse| fcn of |
|00001620| 4e 65 78 74 49 6e 43 68 | 61 69 6e 28 29 20 20 28 |NextInCh|ain() (|
|00001630| 73 65 65 20 61 62 6f 76 | 65 29 0d 09 09 6e 6f 64 |see abov|e)...nod|
|00001640| 65 43 6c 61 73 73 2a 09 | 09 09 09 09 09 50 72 65 |eClass*.|.....Pre|
|00001650| 76 49 6e 43 68 61 69 6e | 28 20 63 6f 6e 73 74 20 |vInChain|( const |
|00001660| 6e 6f 64 65 43 6c 61 73 | 73 2a 20 69 6e 43 65 69 |nodeClas|s* inCei|
|00001670| 6c 69 6e 67 20 29 20 63 | 6f 6e 73 74 3b 0d 09 09 |ling ) c|onst;...|
|00001680| 0d 09 09 2f 2f 09 50 6f | 73 74 3a 09 3c 69 6e 50 |...//.Po|st:.<inP|
|00001690| 74 72 3e 20 69 73 20 64 | 65 74 61 63 68 65 64 20 |tr> is d|etached |
|000016a0| 66 72 6f 6d 20 69 74 27 | 73 20 63 75 72 72 65 6e |from it'|s curren|
|000016b0| 74 20 70 61 72 65 6e 74 | 20 6c 69 73 74 20 61 6e |t parent| list an|
|000016c0| 64 20 69 73 20 69 6e 73 | 65 72 74 65 64 20 61 73 |d is ins|erted as|
|000016d0| 20 74 68 65 20 6c 61 73 | 74 20 6e 6f 64 65 20 69 | the las|t node i|
|000016e0| 6e 20 74 68 69 73 27 20 | 73 75 62 20 6c 69 73 74 |n this' |sub list|
|000016f0| 0d 09 09 76 6f 69 64 20 | 09 09 09 09 09 09 09 61 |...void |.......a|
|00001700| 64 64 54 6f 54 61 69 6c | 28 20 6e 6f 64 65 43 6c |ddToTail|( nodeCl|
|00001710| 61 73 73 2a 20 69 6e 50 | 74 72 20 29 3b 0d 09 09 |ass* inP|tr );...|
|00001720| 0d 09 09 2f 2f 09 50 6f | 73 74 3a 09 3c 69 6e 50 |...//.Po|st:.<inP|
|00001730| 74 72 3e 20 69 73 20 64 | 65 74 61 63 68 65 64 20 |tr> is d|etached |
|00001740| 66 72 6f 6d 20 69 74 27 | 73 20 63 75 72 72 65 6e |from it'|s curren|
|00001750| 74 20 70 61 72 65 6e 74 | 20 6c 69 73 74 20 61 6e |t parent| list an|
|00001760| 64 20 69 73 20 69 6e 73 | 65 72 74 65 64 20 61 74 |d is ins|erted at|
|00001770| 20 74 68 65 20 31 73 74 | 20 6e 6f 64 65 20 69 6e | the 1st| node in|
|00001780| 20 74 68 69 73 27 20 73 | 75 62 20 6c 69 73 74 0d | this' s|ub list.|
|00001790| 09 09 76 6f 69 64 20 09 | 09 09 09 09 09 09 61 64 |..void .|......ad|
|000017a0| 64 54 6f 48 65 61 64 28 | 20 6e 6f 64 65 43 6c 61 |dToHead(| nodeCla|
|000017b0| 73 73 2a 20 69 6e 50 74 | 72 20 29 3b 0d 09 09 0d |ss* inPt|r );....|
|000017c0| 09 09 2f 2f 09 50 6f 73 | 74 3a 09 52 65 74 75 72 |..//.Pos|t:.Retur|
|000017d0| 6e 73 20 74 68 65 20 6c | 61 73 74 20 64 65 65 70 |ns the l|ast deep|
|000017e0| 20 73 75 62 20 6e 6f 64 | 65 20 69 6e 20 74 68 65 | sub nod|e in the|
|000017f0| 20 64 65 65 70 20 73 75 | 62 20 6c 69 73 74 2e 0d | deep su|b list..|
|00001800| 09 09 2f 2f 09 09 09 49 | 6e 20 6f 74 68 65 72 20 |..//...I|n other |
|00001810| 77 6f 72 64 73 2c 20 74 | 68 69 73 20 66 63 6e 20 |words, t|his fcn |
|00001820| 65 71 75 61 6c 73 3a 20 | 74 68 69 73 20 2d 3e 20 |equals: |this -> |
|00001830| 66 69 6e 64 53 75 62 4e | 6f 64 65 28 20 74 68 69 |findSubN|ode( thi|
|00001840| 73 20 2d 3e 20 64 65 65 | 70 43 6f 75 6e 74 28 29 |s -> dee|pCount()|
|00001850| 20 29 0d 09 09 6e 6f 64 | 65 43 6c 61 73 73 2a 09 | )...nod|eClass*.|
|00001860| 09 09 09 09 09 47 65 74 | 44 65 65 70 54 61 69 6c |.....Get|DeepTail|
|00001870| 28 29 20 63 6f 6e 73 74 | 3b 0d 09 09 0d 09 09 2f |() const|;....../|
|00001880| 2f 09 50 6f 73 74 3a 09 | 52 65 74 75 72 6e 73 20 |/.Post:.|Returns |
|00001890| 74 68 65 20 68 69 67 68 | 65 73 74 20 70 61 72 65 |the high|est pare|
|000018a0| 6e 74 2c 20 73 61 79 20 | 70 2c 20 6f 66 20 74 68 |nt, say |p, of th|
|000018b0| 69 73 20 6e 6f 64 65 20 | 77 68 65 72 65 20 28 70 |is node |where (p|
|000018c0| 20 2d 3e 20 47 65 74 44 | 65 65 70 54 61 69 6c 28 | -> GetD|eepTail(|
|000018d0| 29 20 3d 3d 20 74 68 69 | 73 29 20 69 73 20 74 72 |) == thi|s) is tr|
|000018e0| 75 65 2e 20 0d 09 09 2f | 2f 09 09 09 49 6e 20 6f |ue. .../|/...In o|
|000018f0| 74 68 65 72 20 77 6f 72 | 64 73 2c 20 74 68 69 73 |ther wor|ds, this|
|00001900| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 68 69 67 | returns| the hig|
|00001910| 68 65 73 74 20 70 61 72 | 65 6e 74 20 74 68 61 74 |hest par|ent that|
|00001920| 20 68 61 73 20 70 72 65 | 76 20 6e 6f 64 65 2e 0d | has pre|v node..|
|00001930| 09 09 2f 2f 09 4e 6f 74 | 65 3a 09 52 65 74 75 72 |..//.Not|e:.Retur|
|00001940| 6e 73 20 4e 55 4c 4c 20 | 69 66 20 6e 6f 20 73 75 |ns NULL |if no su|
|00001950| 63 68 20 70 61 72 65 6e | 74 20 65 78 69 73 74 73 |ch paren|t exists|
|00001960| 2e 0d 09 09 6e 6f 64 65 | 43 6c 61 73 73 2a 09 09 |....node|Class*..|
|00001970| 09 09 09 09 47 65 74 50 | 61 72 65 6e 74 44 65 65 |....GetP|arentDee|
|00001980| 70 54 61 69 6c 28 20 63 | 6f 6e 73 74 20 6e 6f 64 |pTail( c|onst nod|
|00001990| 65 43 6c 61 73 73 2a 20 | 69 6e 43 65 69 6c 69 6e |eClass* |inCeilin|
|000019a0| 67 20 29 20 63 6f 6e 73 | 74 3b 0d 09 09 0d 09 09 |g ) cons|t;......|
|000019b0| 2f 2f 09 50 6f 73 74 3a | 09 74 68 69 73 20 2d 3e |//.Post:|.this ->|
|000019c0| 20 43 6f 75 6e 74 44 65 | 70 74 68 28 20 47 65 74 | CountDe|pth( Get|
|000019d0| 50 61 72 65 6e 74 44 65 | 65 70 54 61 69 6c 28 20 |ParentDe|epTail( |
|000019e0| 69 6e 43 65 69 6c 69 6e | 67 20 29 20 29 3b 0d 09 |inCeilin|g ) );..|
|000019f0| 09 2f 2f 09 09 09 4f 72 | 2c 20 69 6e 20 65 61 73 |.//...Or|, in eas|
|00001a00| 79 20 74 65 72 6d 73 2c | 20 43 6f 75 6e 74 4f 76 |y terms,| CountOv|
|00001a10| 65 72 68 61 6e 67 20 72 | 65 74 75 72 6e 73 20 74 |erhang r|eturns t|
|00001a20| 68 65 20 64 69 66 66 65 | 72 65 6e 63 65 20 69 6e |he diffe|rence in|
|00001a30| 20 64 65 70 74 68 20 62 | 65 74 77 65 65 6e 20 69 | depth b|etween i|
|00001a40| 74 73 65 6c 66 0d 09 09 | 2f 2f 09 09 09 61 6e 64 |tself...|//...and|
|00001a50| 20 74 68 65 20 70 61 72 | 65 6e 74 20 6e 6f 64 65 | the par|ent node|
|00001a60| 20 77 68 65 72 65 20 43 | 6f 75 6e 74 4f 76 65 72 | where C|ountOver|
|00001a70| 68 61 6e 67 20 69 73 20 | 7a 65 72 6f 2e 0d 09 09 |hang is |zero....|
|00001a80| 2f 2f 09 09 09 4f 72 2c | 20 65 61 73 69 65 72 20 |//...Or,| easier |
|00001a90| 79 65 74 2c 20 0d 09 09 | 2f 2a 09 09 09 31 09 09 |yet, ...|/*...1..|
|00001aa0| 09 09 09 0d 09 09 09 09 | 09 7c 2d 20 32 09 09 09 |........|.|- 2...|
|00001ab0| 09 32 20 2d 3e 20 43 6f | 75 6e 74 4f 76 65 72 68 |.2 -> Co|untOverh|
|00001ac0| 61 6e 67 28 20 31 20 29 | 20 3d 3d 20 30 0d 09 09 |ang( 1 )| == 0...|
|00001ad0| 09 09 09 7c 20 20 7c 2d | 33 20 20 20 20 20 20 20 |...| |-|3 |
|00001ae0| 20 20 20 20 20 20 20 33 | 20 2d 3e 20 43 6f 75 6e | 3| -> Coun|
|00001af0| 74 4f 76 65 72 68 61 6e | 67 28 20 31 20 29 20 3d |tOverhan|g( 1 ) =|
|00001b00| 3d 20 30 0d 09 09 09 09 | 09 7c 20 20 7c 2d 34 09 |= 0.....|.| |-4.|
|00001b10| 09 09 09 34 20 2d 3e 20 | 43 6f 75 6e 74 4f 76 65 |...4 -> |CountOve|
|00001b20| 72 68 61 6e 67 28 20 31 | 20 29 20 3d 3d 20 31 0d |rhang( 1| ) == 1.|
|00001b30| 09 09 09 09 09 7c 0d 09 | 09 09 09 09 7c 2d 20 35 |.....|..|....|- 5|
|00001b40| 09 09 09 09 35 20 2d 3e | 20 43 6f 75 6e 74 4f 76 |....5 ->| CountOv|
|00001b50| 65 72 68 61 6e 67 28 20 | 31 20 29 20 3d 3d 20 30 |erhang( |1 ) == 0|
|00001b60| 0d 09 09 09 09 09 7c 20 | 20 7c 2d 36 09 09 09 09 |......| | |-6....|
|00001b70| 36 20 2d 3e 20 43 6f 75 | 6e 74 4f 76 65 72 68 61 |6 -> Cou|ntOverha|
|00001b80| 6e 67 28 20 31 20 29 20 | 3d 3d 20 31 0d 09 09 09 |ng( 1 ) |== 1....|
|00001b90| 09 09 7c 20 20 20 20 7c | 2d 37 09 09 09 37 20 2d |..| ||-7...7 -|
|00001ba0| 3e 20 43 6f 75 6e 74 4f | 76 65 72 68 61 6e 67 28 |> CountO|verhang(|
|00001bb0| 20 31 20 29 20 3d 3d 20 | 32 0d 09 09 09 09 09 7c | 1 ) == |2......||
|00001bc0| 2d 20 38 09 09 09 09 38 | 20 2d 3e 20 43 6f 75 6e |- 8....8| -> Coun|
|00001bd0| 74 4f 76 65 72 68 61 6e | 67 28 20 31 20 29 20 3d |tOverhan|g( 1 ) =|
|00001be0| 3d 20 31 09 09 09 09 2a | 2f 0d 09 09 69 6e 74 09 |= 1....*|/...int.|
|00001bf0| 09 09 09 09 09 09 09 43 | 6f 75 6e 74 4f 76 65 72 |.......C|ountOver|
|00001c00| 68 61 6e 67 28 20 63 6f | 6e 73 74 20 6e 6f 64 65 |hang( co|nst node|
|00001c10| 43 6c 61 73 73 2a 20 69 | 6e 43 65 69 6c 69 6e 67 |Class* i|nCeiling|
|00001c20| 20 29 20 63 6f 6e 73 74 | 3b 0d 0d 09 09 2f 2f 09 | ) const|;....//.|
|00001c30| 50 6f 73 74 3a 09 55 73 | 65 64 20 62 79 20 61 20 |Post:.Us|ed by a |
|00001c40| 47 55 49 20 74 6f 20 72 | 65 66 69 6e 65 20 61 20 |GUI to r|efine a |
|00001c50| 67 69 76 65 6e 20 69 6e | 73 65 72 74 69 6f 6e 20 |given in|sertion |
|00001c60| 70 6f 69 6e 74 2e 0d 09 | 09 2f 2f 09 50 6f 73 74 |point...|.//.Post|
|00001c70| 3a 09 3c 69 6f 4e 6f 64 | 65 4e 75 6d 3e 20 61 6e |:.<ioNod|eNum> an|
|00001c80| 64 20 3c 69 6f 44 65 70 | 74 68 3e 20 6d 61 79 20 |d <ioDep|th> may |
|00001c90| 62 65 20 61 64 6a 75 73 | 74 65 64 2f 63 6f 72 72 |be adjus|ted/corr|
|00001ca0| 65 63 74 65 64 2e 0d 09 | 09 2f 2f 09 4e 6f 74 65 |ected...|.//.Note|
|00001cb0| 3a 09 44 65 70 74 68 73 | 20 61 72 65 20 73 75 63 |:.Depths| are suc|
|00001cc0| 68 20 74 68 61 74 20 30 | 20 6d 65 61 6e 73 20 72 |h that 0| means r|
|00001cd0| 6f 6f 74 20 6c 65 76 65 | 6c 2e 0d 09 09 2f 2f 09 |oot leve|l....//.|
|00001ce0| 4e 6f 74 65 3a 09 46 63 | 6e 20 73 75 63 63 65 73 |Note:.Fc|n succes|
|00001cf0| 66 75 6c 20 69 66 66 20 | 3c 74 72 75 65 3e 20 69 |ful iff |<true> i|
|00001d00| 73 20 72 65 74 75 72 6e | 65 64 2e 0d 09 09 76 69 |s return|ed....vi|
|00001d10| 72 74 75 61 6c 20 62 6f | 6f 6c 09 09 09 09 09 43 |rtual bo|ol.....C|
|00001d20| 68 65 63 6b 49 6e 73 65 | 72 74 50 74 28 20 6c 6f |heckInse|rtPt( lo|
|00001d30| 6e 67 26 20 69 6f 4e 6f | 64 65 4e 75 6d 2c 20 6c |ng& ioNo|deNum, l|
|00001d40| 6f 6e 67 26 20 69 6f 44 | 65 70 74 68 20 29 3b 0d |ong& ioD|epth );.|
|00001d50| 0d 09 09 2f 2f 09 50 6f | 73 74 3a 09 4d 69 72 72 |...//.Po|st:.Mirr|
|00001d60| 6f 72 73 20 61 20 47 55 | 49 20 64 72 61 67 20 6f |ors a GU|I drag o|
|00001d70| 66 20 74 68 65 20 73 65 | 6c 65 63 74 65 64 20 69 |f the se|lected i|
|00001d80| 74 65 6d 73 20 64 72 6f | 70 70 65 64 20 62 65 66 |tems dro|pped bef|
|00001d90| 6f 72 65 20 63 65 6c 6c | 20 3c 69 6e 41 62 6f 76 |ore cell| <inAbov|
|00001da0| 65 43 65 6c 6c 3e 20 61 | 74 20 64 65 70 74 68 20 |eCell> a|t depth |
|00001db0| 3c 69 6e 44 65 70 74 68 | 3e 0d 09 09 2f 2f 09 4e |<inDepth|>...//.N|
|00001dc0| 6f 74 65 3a 09 49 66 20 | 3c 69 6e 44 65 70 74 68 |ote:.If |<inDepth|
|00001dd0| 3e 20 69 73 20 69 6e 76 | 61 6c 69 64 20 6f 72 20 |> is inv|alid or |
|00001de0| 3c 69 6e 41 62 6f 76 65 | 43 65 6c 6c 3e 20 3c 20 |<inAbove|Cell> < |
|00001df0| 30 20 6f 72 20 3e 20 4e | 2c 20 74 68 65 20 63 6c |0 or > N|, the cl|
|00001e00| 6f 73 65 73 74 20 62 6f | 75 6e 64 72 79 20 69 73 |osest bo|undry is|
|00001e10| 20 75 73 65 64 2e 0d 09 | 09 2f 2f 09 43 61 6c 6c | used...|.//.Call|
|00001e20| 73 3a 09 56 65 72 69 66 | 79 4e 6f 64 65 28 29 0d |s:.Verif|yNode().|
|00001e30| 09 09 76 69 72 74 75 61 | 6c 20 76 6f 69 64 09 09 |..virtua|l void..|
|00001e40| 09 09 09 4d 6f 76 65 53 | 65 6c 65 63 74 65 64 28 |...MoveS|elected(|
|00001e50| 20 6c 6f 6e 67 20 61 66 | 74 65 72 49 74 65 6d 4e | long af|terItemN|
|00001e60| 75 6d 2c 20 6c 6f 6e 67 | 20 69 6e 44 65 70 74 68 |um, long| inDepth|
|00001e70| 20 29 3b 0d 09 09 0d 09 | 09 2f 2f 09 50 6f 73 74 | );.....|.//.Post|
|00001e80| 3a 09 45 78 61 6d 69 6e | 65 73 20 3c 6e 6f 64 65 |:.Examin|es <node|
|00001e90| 41 64 64 65 64 3e 20 74 | 6f 20 73 65 65 20 69 66 |Added> t|o see if|
|00001ea0| 20 69 74 27 73 20 69 6e | 20 61 20 76 61 6c 69 64 | it's in| a valid|
|00001eb0| 20 6c 6f 63 61 74 69 6f | 6e 2e 20 20 49 66 20 6e | locatio|n. If n|
|00001ec0| 6f 74 2c 20 69 74 20 6d | 61 79 20 62 65 20 6d 6f |ot, it m|ay be mo|
|00001ed0| 76 65 64 20 6f 72 20 64 | 65 6c 65 74 65 64 2e 0d |ved or d|eleted..|
|00001ee0| 09 09 76 69 72 74 75 61 | 6c 20 76 6f 69 64 09 09 |..virtua|l void..|
|00001ef0| 09 09 09 56 65 72 69 66 | 79 4e 6f 64 65 28 20 6e |...Verif|yNode( n|
|00001f00| 6f 64 65 43 6c 61 73 73 | 2a 20 6e 6f 64 65 41 64 |odeClass|* nodeAd|
|00001f10| 64 65 64 20 29 3b 0d 09 | 09 0d 09 09 2f 2f 09 50 |ded );..|....//.P|
|00001f20| 6f 73 74 3a 09 44 65 6c | 65 74 65 27 73 20 61 6c |ost:.Del|ete's al|
|00001f30| 6c 20 73 75 62 20 6e 6f | 64 65 73 20 69 6e 20 74 |l sub no|des in t|
|00001f40| 68 69 73 20 6e 6f 64 65 | 0d 09 09 76 69 72 74 75 |his node|...virtu|
|00001f50| 61 6c 20 76 6f 69 64 20 | 09 09 09 09 09 64 65 6c |al void |.....del|
|00001f60| 65 74 65 43 6f 6e 74 65 | 6e 74 73 28 29 3b 0d 09 |eteConte|nts();..|
|00001f70| 09 0d 09 09 2f 2f 09 50 | 6f 73 74 3a 09 54 72 61 |....//.P|ost:.Tra|
|00001f80| 76 65 6c 73 20 75 70 77 | 61 72 64 20 69 6e 20 69 |vels upw|ard in i|
|00001f90| 74 73 20 68 69 65 72 61 | 72 63 68 79 20 75 6e 74 |ts hiera|rchy unt|
|00001fa0| 69 6c 20 69 74 20 66 69 | 6e 64 73 20 61 20 70 61 |il it fi|nds a pa|
|00001fb0| 72 65 6e 74 20 77 69 74 | 68 6f 75 74 20 69 74 73 |rent wit|hout its|
|00001fc0| 20 6f 77 6e 20 70 61 72 | 65 6e 74 0d 09 09 6e 6f | own par|ent...no|
|00001fd0| 64 65 43 6c 61 73 73 2a | 09 09 09 09 09 09 67 65 |deClass*|......ge|
|00001fe0| 74 48 69 67 68 65 73 74 | 50 61 72 65 6e 74 28 29 |tHighest|Parent()|
|00001ff0| 3b 0d 09 09 09 09 0d 09 | 09 2f 2f 09 50 6f 73 74 |;.......|.//.Post|
|00002000| 3a 09 52 65 74 75 72 6e | 73 20 3c 74 72 75 65 3e |:.Return|s <true>|
|00002010| 20 69 66 20 3c 69 6e 4d | 61 79 62 65 50 61 72 65 | if <inM|aybePare|
|00002020| 6e 74 3e 20 69 73 20 61 | 6e 79 20 70 61 72 65 6e |nt> is a|ny paren|
|00002030| 74 20 6f 66 20 74 68 69 | 73 2e 0d 09 09 2f 2f 09 |t of thi|s....//.|
|00002040| 4e 6f 74 65 3a 09 49 66 | 20 69 6e 4d 61 79 62 65 |Note:.If| inMaybe|
|00002050| 50 61 72 65 6e 74 20 3d | 3d 20 4e 55 4c 4c 2c 20 |Parent =|= NULL, |
|00002060| 66 61 6c 73 65 20 69 73 | 20 72 65 74 75 72 6e 65 |false is| returne|
|00002070| 64 2e 0d 09 09 62 6f 6f | 6c 09 09 09 09 09 09 09 |d....boo|l.......|
|00002080| 48 61 73 54 68 65 50 61 | 72 65 6e 74 28 20 63 6f |HasThePa|rent( co|
|00002090| 6e 73 74 20 6e 6f 64 65 | 43 6c 61 73 73 2a 20 69 |nst node|Class* i|
|000020a0| 6e 4d 61 79 62 65 50 61 | 72 65 6e 74 20 29 20 63 |nMaybePa|rent ) c|
|000020b0| 6f 6e 73 74 3b 0d 09 09 | 0d 09 09 2f 2f 09 50 6f |onst;...|...//.Po|
|000020c0| 73 74 3a 09 52 65 74 75 | 72 6e 73 20 3c 74 72 75 |st:.Retu|rns <tru|
|000020d0| 65 3e 20 69 66 20 74 68 | 69 73 20 6e 6f 64 65 20 |e> if th|is node |
|000020e0| 63 6f 6e 74 61 69 6e 73 | 20 6f 74 68 65 72 20 6e |contains| other n|
|000020f0| 6f 64 65 73 20 20 28 6f | 70 74 69 6d 69 7a 65 64 |odes (o|ptimized|
|00002100| 20 66 6f 72 20 73 70 65 | 65 64 29 0d 09 09 69 6e | for spe|ed)...in|
|00002110| 6c 69 6e 65 20 62 6f 6f | 6c 09 09 09 09 09 09 49 |line boo|l......I|
|00002120| 73 45 6d 70 74 79 28 29 | 20 63 6f 6e 73 74 20 09 |sEmpty()| const .|
|00002130| 09 09 09 09 09 09 09 7b | 20 72 65 74 75 72 6e 20 |.......{| return |
|00002140| 6d 48 65 61 64 20 3d 3d | 20 4e 55 4c 4c 3b 09 09 |mHead ==| NULL;..|
|00002150| 7d 0d 09 09 0d 09 09 2f | 2f 09 50 6f 73 74 3a 09 |}....../|/.Post:.|
|00002160| 52 65 74 75 72 6e 73 20 | 74 68 65 20 6e 75 6d 62 |Returns |the numb|
|00002170| 65 72 20 6f 66 20 6e 6f | 64 65 73 20 69 6e 20 74 |er of no|des in t|
|00002180| 68 69 73 20 6e 6f 64 65 | 27 73 20 73 75 62 20 6c |his node|'s sub l|
|00002190| 69 73 74 20 28 69 6e 20 | 63 6f 6e 74 72 61 73 74 |ist (in |contrast|
|000021a0| 20 74 6f 20 64 65 65 70 | 43 6f 75 6e 74 28 29 20 | to deep|Count() |
|000021b0| 29 0d 09 09 69 6e 6c 69 | 6e 65 20 6c 6f 6e 67 09 |)...inli|ne long.|
|000021c0| 09 09 09 09 09 73 68 61 | 6c 6c 6f 77 43 6f 75 6e |.....sha|llowCoun|
|000021d0| 74 28 29 20 63 6f 6e 73 | 74 09 09 09 09 09 09 09 |t() cons|t.......|
|000021e0| 7b 20 72 65 74 75 72 6e | 20 6d 53 68 61 6c 6c 6f |{ return| mShallo|
|000021f0| 77 43 6f 75 6e 74 3b 09 | 09 7d 0d 09 09 0d 09 09 |wCount;.|.}......|
|00002200| 2f 2f 09 50 6f 73 74 3a | 09 52 65 74 75 72 6e 73 |//.Post:|.Returns|
|00002210| 20 74 68 65 20 74 6f 74 | 61 6c 20 6e 75 6d 62 65 | the tot|al numbe|
|00002220| 72 20 6f 66 20 6e 6f 64 | 65 73 20 69 6e 20 74 68 |r of nod|es in th|
|00002230| 69 73 20 6e 6f 64 65 27 | 73 20 73 75 62 20 6c 69 |is node'|s sub li|
|00002240| 73 74 20 50 4c 55 53 20 | 74 68 65 20 6e 75 6d 62 |st PLUS |the numb|
|00002250| 65 72 20 6f 66 20 69 74 | 65 6d 73 20 69 6e 20 2a |er of it|ems in *|
|00002260| 74 68 65 69 72 2a 20 73 | 75 62 20 6c 69 73 74 73 |their* s|ub lists|
|00002270| 2e 0d 09 09 6c 6f 6e 67 | 09 09 09 09 09 09 09 64 |....long|.......d|
|00002280| 65 65 70 43 6f 75 6e 74 | 28 29 3b 0d 09 09 0d 09 |eepCount|();.....|
|00002290| 09 2f 2f 09 50 6f 73 74 | 3a 09 52 65 74 75 72 6e |.//.Post|:.Return|
|000022a0| 73 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |s the nu|mber of |
|000022b0| 73 75 70 65 72 20 6c 69 | 73 74 73 20 61 62 6f 76 |super li|sts abov|
|000022c0| 65 20 74 68 69 73 20 6e | 6f 64 65 2e 20 45 78 2c |e this n|ode. Ex,|
|000022d0| 20 69 66 20 74 68 69 73 | 20 6e 6f 64 65 20 64 69 | if this| node di|
|000022e0| 64 6e 27 74 20 68 61 76 | 65 20 61 20 70 61 72 65 |dn't hav|e a pare|
|000022f0| 6e 74 2c 20 63 6f 75 6e | 74 44 65 70 74 68 28 29 |nt, coun|tDepth()|
|00002300| 0d 09 09 2f 2f 09 09 09 | 77 6f 75 6c 64 20 72 65 |...//...|would re|
|00002310| 74 75 72 6e 20 30 2e 20 | 20 49 66 20 77 65 20 74 |turn 0. | If we t|
|00002320| 68 65 6e 20 70 75 74 20 | 69 74 20 69 6e 73 69 64 |hen put |it insid|
|00002330| 65 20 61 20 6e 65 77 6c | 79 20 63 6f 6e 73 74 72 |e a newl|y constr|
|00002340| 75 63 74 65 64 20 6e 6f | 64 65 2c 20 63 6f 75 6e |ucted no|de, coun|
|00002350| 74 44 65 70 74 68 28 29 | 20 77 6f 75 6c 64 20 72 |tDepth()| would r|
|00002360| 65 74 75 72 6e 20 31 2e | 0d 09 09 6c 6f 6e 67 09 |eturn 1.|...long.|
|00002370| 09 09 09 09 09 09 43 6f | 75 6e 74 44 65 70 74 68 |......Co|untDepth|
|00002380| 28 20 63 6f 6e 73 74 20 | 6e 6f 64 65 43 6c 61 73 |( const |nodeClas|
|00002390| 73 2a 20 69 6e 43 65 69 | 6c 69 6e 67 20 29 20 63 |s* inCei|ling ) c|
|000023a0| 6f 6e 73 74 3b 0d 09 09 | 0d 09 09 2f 2f 09 50 6f |onst;...|...//.Po|
|000023b0| 73 74 3a 09 52 65 74 75 | 72 6e 20 77 68 61 74 20 |st:.Retu|rn what |
|000023c0| 6e 6f 64 65 20 6e 75 6d | 62 65 72 20 74 68 69 73 |node num|ber this|
|000023d0| 20 6e 6f 64 65 20 69 73 | 20 69 6e 20 69 74 73 20 | node is| in its |
|000023e0| 70 61 72 65 6e 74 27 73 | 20 73 68 61 6c 6c 6f 77 |parent's| shallow|
|000023f0| 20 6c 69 73 74 2e 20 20 | 45 78 2c 20 69 66 20 79 | list. |Ex, if y|
|00002400| 6f 75 20 61 64 64 65 64 | 20 74 68 69 73 20 6e 6f |ou added| this no|
|00002410| 64 65 20 74 6f 20 74 68 | 65 20 68 65 61 64 20 6f |de to th|e head o|
|00002420| 66 0d 09 09 2f 2f 09 09 | 09 61 6e 6f 74 68 65 72 |f...//..|.another|
|00002430| 20 6e 6f 64 65 2c 20 66 | 69 6e 64 49 6e 73 74 61 | node, f|indInsta|
|00002440| 6e 63 65 28 29 20 77 6f | 75 6c 64 20 72 65 74 75 |nce() wo|uld retu|
|00002450| 72 6e 20 61 20 31 2e 20 | 20 49 66 20 74 68 69 73 |rn a 1. | If this|
|00002460| 20 6e 6f 64 65 20 69 73 | 20 6e 6f 74 20 69 6e 20 | node is| not in |
|00002470| 61 20 73 75 62 20 6c 69 | 73 74 20 28 69 65 2c 20 |a sub li|st (ie, |
|00002480| 69 74 20 68 61 73 20 6e | 6f 20 70 61 72 65 6e 74 |it has n|o parent|
|00002490| 29 2c 20 0d 09 09 2f 2f | 09 09 09 61 20 30 20 69 |), ...//|...a 0 i|
|000024a0| 73 20 72 65 74 75 72 6e | 65 64 2e 0d 09 09 6c 6f |s return|ed....lo|
|000024b0| 6e 67 09 09 09 09 09 09 | 09 66 69 6e 64 49 6e 73 |ng......|.findIns|
|000024c0| 74 61 6e 63 65 28 29 20 | 63 6f 6e 73 74 3b 0d 09 |tance() |const;..|
|000024d0| 09 0d 09 09 2f 2f 09 50 | 6f 73 74 3a 09 52 65 74 |....//.P|ost:.Ret|
|000024e0| 75 72 6e 73 20 74 68 65 | 20 3c 69 6e 4e 6f 64 65 |urns the| <inNode|
|000024f0| 4e 75 6d 3e 74 68 20 6e | 6f 64 65 20 69 6e 20 74 |Num>th n|ode in t|
|00002500| 68 69 73 20 6e 6f 64 65 | 27 73 20 28 73 68 61 6c |his node|'s (shal|
|00002510| 6c 6f 77 29 20 73 75 62 | 20 6c 69 73 74 2e 20 41 |low) sub| list. A|
|00002520| 20 4e 55 4c 4c 20 69 73 | 20 72 65 74 75 72 6e 65 | NULL is| returne|
|00002530| 64 20 69 66 20 3c 69 6e | 4e 6f 64 65 4e 75 6d 3e |d if <in|NodeNum>|
|00002540| 0d 09 09 2f 2f 09 09 09 | 69 73 20 6c 65 73 73 20 |...//...|is less |
|00002550| 74 68 61 6e 20 6f 72 20 | 65 71 75 61 6c 20 74 6f |than or |equal to|
|00002560| 20 7a 65 72 6f 20 6f 72 | 20 69 66 20 67 72 65 61 | zero or| if grea|
|00002570| 74 65 72 20 74 68 61 6e | 20 74 68 65 20 6e 75 6d |ter than| the num|
|00002580| 62 65 72 20 6f 66 20 69 | 74 65 6d 73 20 69 6e 20 |ber of i|tems in |
|00002590| 74 68 69 73 20 6e 6f 64 | 65 27 73 20 73 75 62 20 |this nod|e's sub |
|000025a0| 6c 69 73 74 2e 0d 09 09 | 6e 6f 64 65 43 6c 61 73 |list....|nodeClas|
|000025b0| 73 2a 09 09 09 09 09 09 | 66 69 6e 64 4e 6f 64 65 |s*......|findNode|
|000025c0| 4e 75 6d 28 20 6c 6f 6e | 67 20 69 6e 4e 6f 64 65 |Num( lon|g inNode|
|000025d0| 4e 75 6d 20 29 3b 0d 0d | 09 09 2f 2f 09 50 6f 73 |Num );..|..//.Pos|
|000025e0| 74 3a 09 53 69 6d 69 6c | 61 72 20 74 6f 20 66 69 |t:.Simil|ar to fi|
|000025f0| 6e 64 4e 6f 64 65 4e 75 | 6d 28 20 6c 6f 6e 67 20 |ndNodeNu|m( long |
|00002600| 29 20 65 78 63 65 70 74 | 20 74 68 61 74 20 74 68 |) except| that th|
|00002610| 65 20 6e 6f 64 65 20 72 | 65 74 75 72 6e 65 64 20 |e node r|eturned |
|00002620| 69 73 20 74 68 65 20 3c | 69 6e 4e 6f 64 65 4e 75 |is the <|inNodeNu|
|00002630| 6d 3e 74 68 20 6e 6f 64 | 65 20 69 6e 20 74 68 65 |m>th nod|e in the|
|00002640| 20 5f 65 6e 74 69 72 65 | 5f 0d 09 09 2f 2f 09 09 | _entire|_...//..|
|00002650| 09 5f 73 75 62 5f 20 5f | 74 72 65 65 5f 20 28 61 |._sub_ _|tree_ (a|
|00002660| 73 20 6f 70 70 6f 73 65 | 64 20 74 6f 20 74 68 65 |s oppose|d to the|
|00002670| 20 62 61 73 65 20 73 75 | 62 20 6c 65 76 65 6c 29 | base su|b level)|
|00002680| 2e 20 20 49 66 20 77 65 | 20 68 61 64 20 32 20 73 |. If we| had 2 s|
|00002690| 75 62 20 6e 6f 64 65 73 | 20 70 65 72 20 6e 6f 64 |ub nodes| per nod|
|000026a0| 65 20 61 6e 64 20 77 65 | 20 68 61 64 20 33 20 6c |e and we| had 3 l|
|000026b0| 65 76 65 6c 73 20 6f 66 | 0d 09 09 2f 2f 09 09 09 |evels of|...//...|
|000026c0| 74 68 65 73 65 2c 20 74 | 68 65 72 65 20 77 6f 75 |these, t|here wou|
|000026d0| 6c 64 20 62 65 20 61 20 | 74 6f 74 61 6c 20 6f 66 |ld be a |total of|
|000026e0| 20 32 5e 33 20 6c 65 61 | 76 65 73 20 61 6e 64 20 | 2^3 lea|ves and |
|000026f0| 61 20 74 6f 74 61 6c 20 | 6f 66 20 32 5e 34 2d 31 |a total |of 2^4-1|
|00002700| 20 6e 6f 64 65 73 2e 20 | 20 66 69 6e 64 53 75 62 | nodes. | findSub|
|00002710| 4e 6f 64 65 28 20 38 20 | 29 20 77 6f 75 6c 64 20 |Node( 8 |) would |
|00002720| 72 65 74 75 72 6e 20 74 | 68 65 0d 09 09 2f 2f 09 |return t|he...//.|
|00002730| 09 09 73 65 63 6f 6e 64 | 20 6e 6f 64 65 20 61 74 |..second| node at|
|00002740| 20 74 68 65 20 72 6f 6f | 74 20 6c 65 76 65 6c 2e | the roo|t level.|
|00002750| 20 20 54 68 65 20 69 6e | 76 65 72 73 65 20 6f 66 | The in|verse of|
|00002760| 20 74 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 69 | this fu|nction i|
|00002770| 73 20 66 69 6e 64 53 75 | 62 4e 6f 64 65 28 20 6e |s findSu|bNode( n|
|00002780| 6f 64 65 43 6c 61 73 73 | 2a 20 29 20 61 6e 64 20 |odeClass|* ) and |
|00002790| 66 69 6e 64 4e 75 6d 28 | 29 2e 20 0d 09 09 2f 2f |findNum(|). ...//|
|000027a0| 09 4e 6f 74 65 3a 09 49 | 66 20 3c 69 6e 4e 6f 64 |.Note:.I|f <inNod|
|000027b0| 65 4e 75 6d 3e 20 64 6f | 65 73 20 6e 6f 74 20 65 |eNum> do|es not e|
|000027c0| 78 69 73 74 20 28 69 65 | 2c 20 69 74 27 73 20 3c |xist (ie|, it's <|
|000027d0| 3d 20 30 20 6f 72 20 3e | 20 64 65 65 70 43 6f 75 |= 0 or >| deepCou|
|000027e0| 6e 74 28 29 29 20 74 68 | 65 6e 20 4e 55 4c 4c 20 |nt()) th|en NULL |
|000027f0| 69 73 20 72 65 74 75 72 | 6e 65 64 2e 0d 09 09 76 |is retur|ned....v|
|00002800| 69 72 74 75 61 6c 20 6e | 6f 64 65 43 6c 61 73 73 |irtual n|odeClass|
|00002810| 2a 09 09 09 09 66 69 6e | 64 53 75 62 4e 6f 64 65 |*....fin|dSubNode|
|00002820| 28 20 6c 6f 6e 67 20 69 | 6e 4e 6f 64 65 4e 75 6d |( long i|nNodeNum|
|00002830| 20 29 3b 0d 09 09 09 09 | 09 0d 09 09 2f 2f 09 50 | );.....|....//.P|
|00002840| 6f 73 74 3a 09 54 68 69 | 73 20 69 73 20 74 68 65 |ost:.Thi|s is the|
|00002850| 20 65 78 61 63 74 20 69 | 6e 76 65 72 73 65 20 66 | exact i|nverse f|
|00002860| 75 6e 63 74 69 6f 6e 20 | 6f 66 20 66 69 6e 64 53 |unction |of findS|
|00002870| 75 62 4e 6f 64 65 28 20 | 6c 6f 6e 67 20 29 2e 20 |ubNode( |long ). |
|00002880| 54 68 69 73 20 66 63 6e | 20 72 65 74 75 72 6e 73 |This fcn| returns|
|00002890| 20 74 68 65 20 64 65 65 | 70 20 69 6e 73 74 61 6e | the dee|p instan|
|000028a0| 63 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 3c 69 6e |ce numbe|r of <in|
|000028b0| 4e 6f 64 65 50 74 72 3e | 0d 09 09 2f 2f 09 09 09 |NodePtr>|...//...|
|000028c0| 69 6e 20 74 68 69 73 20 | 6e 6f 64 65 20 64 65 65 |in this |node dee|
|000028d0| 70 20 73 75 62 20 74 72 | 65 65 2e 20 20 49 66 20 |p sub tr|ee. If |
|000028e0| 74 68 65 20 6e 6f 64 65 | 20 77 61 73 20 6e 6f 74 |the node| was not|
|000028f0| 20 66 6f 75 6e 64 20 69 | 6e 20 74 68 69 73 20 6e | found i|n this n|
|00002900| 6f 64 65 27 73 20 73 75 | 62 20 74 72 65 65 2c 20 |ode's su|b tree, |
|00002910| 30 20 69 73 20 72 65 74 | 75 72 6e 65 64 2e 0d 09 |0 is ret|urned...|
|00002920| 09 2f 2f 09 4e 6f 74 65 | 3a 09 49 66 20 3c 69 6e |.//.Note|:.If <in|
|00002930| 4e 6f 64 65 50 74 72 3e | 20 69 73 20 4e 55 4c 4c |NodePtr>| is NULL|
|00002940| 2c 20 30 20 69 73 20 72 | 65 74 75 72 6e 65 64 2e |, 0 is r|eturned.|
|00002950| 0d 09 09 76 69 72 74 75 | 61 6c 20 6c 6f 6e 67 09 |...virtu|al long.|
|00002960| 09 09 09 09 66 69 6e 64 | 53 75 62 4e 6f 64 65 28 |....find|SubNode(|
|00002970| 20 6e 6f 64 65 43 6c 61 | 73 73 2a 20 69 6e 4e 6f | nodeCla|ss* inNo|
|00002980| 64 65 50 74 72 20 29 3b | 0d 0d 09 09 2f 2f 09 50 |dePtr );|....//.P|
|00002990| 6f 73 74 3a 09 41 6c 6c | 20 73 75 62 20 6e 6f 64 |ost:.All| sub nod|
|000029a0| 65 73 20 69 6e 20 3c 73 | 6f 75 72 63 65 4c 69 73 |es in <s|ourceLis|
|000029b0| 74 3e 20 61 72 65 20 61 | 70 70 65 6e 64 65 64 20 |t> are a|ppended |
|000029c0| 69 6e 20 6f 72 64 65 72 | 20 69 6e 73 69 64 65 20 |in order| inside |
|000029d0| 74 68 69 73 20 6e 6f 64 | 65 2e 20 20 49 66 20 3c |this nod|e. If <|
|000029e0| 69 6e 50 75 74 41 74 48 | 65 61 64 3e 20 69 73 20 |inPutAtH|ead> is |
|000029f0| 74 72 75 65 2c 20 74 68 | 65 20 6e 6f 64 65 73 0d |true, th|e nodes.|
|00002a00| 09 09 2f 2f 09 09 09 69 | 6e 20 3c 73 6f 75 72 63 |..//...i|n <sourc|
|00002a10| 65 4c 69 73 74 3e 20 61 | 72 65 20 70 75 74 20 61 |eList> a|re put a|
|00002a20| 74 20 74 68 65 20 68 65 | 61 64 20 6f 66 20 74 68 |t the he|ad of th|
|00002a30| 69 73 2c 20 61 6e 64 20 | 69 66 20 69 74 20 69 73 |is, and |if it is|
|00002a40| 20 66 61 6c 73 65 2c 20 | 74 68 65 20 6e 6f 64 65 | false, |the node|
|00002a50| 73 20 61 72 65 20 70 75 | 74 20 61 74 20 74 68 65 |s are pu|t at the|
|00002a60| 20 74 61 69 6c 20 6f 66 | 20 74 68 69 73 2e 0d 09 | tail of| this...|
|00002a70| 09 76 6f 69 64 09 09 09 | 09 09 09 09 61 62 73 6f |.void...|....abso|
|00002a80| 72 62 43 6f 6e 74 65 6e | 74 73 28 20 6e 6f 64 65 |rbConten|ts( node|
|00002a90| 43 6c 61 73 73 2a 20 73 | 6f 75 72 63 65 4c 69 73 |Class* s|ourceLis|
|00002aa0| 74 2c 20 69 6e 74 20 69 | 6e 50 75 74 41 74 48 65 |t, int i|nPutAtHe|
|00002ab0| 61 64 20 3d 20 74 72 75 | 65 20 29 3b 0d 0d 09 09 |ad = tru|e );....|
|00002ac0| 2f 2f 09 50 6f 73 74 3a | 09 41 6c 6c 20 73 75 62 |//.Post:|.All sub|
|00002ad0| 20 6e 6f 64 65 73 20 69 | 6e 20 3c 73 6f 75 72 63 | nodes i|n <sourc|
|00002ae0| 65 4c 69 73 74 3e 20 61 | 72 65 20 6d 6f 76 65 64 |eList> a|re moved|
|00002af0| 20 74 6f 20 74 68 65 20 | 74 61 69 6c 20 6f 66 20 | to the |tail of |
|00002b00| 74 68 69 73 20 69 66 20 | 74 68 65 79 20 61 72 65 |this if |they are|
|00002b10| 20 6d 61 72 6b 65 64 0d | 09 09 76 6f 69 64 09 09 | marked.|..void..|
|00002b20| 09 09 09 09 09 61 62 73 | 6f 72 62 4d 61 72 6b 65 |.....abs|orbMarke|
|00002b30| 64 28 20 6e 6f 64 65 43 | 6c 61 73 73 2a 20 73 6f |d( nodeC|lass* so|
|00002b40| 75 72 63 65 4c 69 73 74 | 20 29 3b 0d 09 09 0d 09 |urceList| );.....|
|00002b50| 09 2f 2f 09 50 6f 73 74 | 3a 09 41 6c 6c 20 73 75 |.//.Post|:.All su|
|00002b60| 62 20 6e 6f 64 65 73 20 | 69 6e 20 3c 73 6f 75 72 |b nodes |in <sour|
|00002b70| 63 65 4c 69 73 74 3e 20 | 61 72 65 20 6d 6f 76 65 |ceList> |are move|
|00002b80| 64 20 61 66 74 65 72 20 | 74 68 69 73 20 6e 6f 64 |d after |this nod|
|00002b90| 65 20 28 74 68 75 73 20 | 70 6c 61 63 69 6e 67 20 |e (thus |placing |
|00002ba0| 74 68 65 6d 20 69 6e 20 | 74 68 69 73 20 6e 6f 64 |them in |this nod|
|00002bb0| 65 27 73 20 70 61 72 65 | 6e 74 27 73 20 73 75 62 |e's pare|nt's sub|
|00002bc0| 20 6c 69 73 74 29 09 0d | 09 09 76 6f 69 64 09 09 | list)..|..void..|
|00002bd0| 09 09 09 09 09 61 62 73 | 6f 72 62 41 66 74 65 72 |.....abs|orbAfter|
|00002be0| 28 20 6e 6f 64 65 43 6c | 61 73 73 2a 20 73 6f 75 |( nodeCl|ass* sou|
|00002bf0| 72 63 65 4c 69 73 74 20 | 29 3b 0d 0d 09 09 2f 2f |rceList |);....//|
|00002c00| 09 50 6f 73 74 3a 09 52 | 61 6e 64 6f 6d 69 7a 65 |.Post:.R|andomize|
|00002c10| 73 20 61 6c 6c 20 73 75 | 62 20 6e 6f 64 65 73 20 |s all su|b nodes |
|00002c20| 77 69 74 68 69 6e 20 74 | 68 69 73 20 6e 6f 64 65 |within t|his node|
|00002c30| 2e 09 09 0d 09 09 76 6f | 69 64 09 09 09 09 09 09 |......vo|id......|
|00002c40| 09 52 61 6e 64 6f 6d 69 | 7a 65 53 75 62 73 28 29 |.Randomi|zeSubs()|
|00002c50| 3b 0d 09 09 0d 09 09 76 | 69 72 74 75 61 6c 20 76 |;......v|irtual v|
|00002c60| 6f 69 64 09 09 09 09 09 | 57 72 69 74 65 54 6f 28 |oid.....|WriteTo(|
|00002c70| 20 43 45 67 4f 53 74 72 | 65 61 6d 2a 20 69 6e 53 | CEgOStr|eam* inS|
|00002c80| 74 72 65 61 6d 20 29 3b | 0d 09 09 76 69 72 74 75 |tream );|...virtu|
|00002c90| 61 6c 20 76 6f 69 64 09 | 09 09 09 09 52 65 61 64 |al void.|....Read|
|00002ca0| 46 72 6f 6d 28 20 43 45 | 67 49 53 74 72 65 61 6d |From( CE|gIStream|
|00002cb0| 2a 20 69 6e 46 69 6c 65 | 20 29 3b 0d 09 09 76 69 |* inFile| );...vi|
|00002cc0| 72 74 75 61 6c 20 76 6f | 69 64 09 09 09 09 09 53 |rtual vo|id.....S|
|00002cd0| 74 61 72 74 52 65 61 64 | 28 20 43 45 67 49 53 74 |tartRead|( CEgISt|
|00002ce0| 72 65 61 6d 2a 20 69 6e | 46 69 6c 65 20 29 3b 0d |ream* in|File );.|
|00002cf0| 0d 7d 3b 0d 0d 0d 0d 74 | 65 6d 70 6c 61 74 65 20 |.};....t|emplate |
|00002d00| 3c 63 6c 61 73 73 20 54 | 3e 20 63 6c 61 73 73 20 |<class T|> class |
|00002d10| 54 4e 6f 64 65 52 65 67 | 69 73 74 72 61 72 20 7b |TNodeReg|istrar {|
|00002d20| 0d 0d 09 70 75 62 6c 69 | 63 3a 0d 09 09 73 74 61 |...publi|c:...sta|
|00002d30| 74 69 63 20 54 2a 09 09 | 09 09 09 09 43 72 65 61 |tic T*..|....Crea|
|00002d40| 74 65 46 72 6f 6d 53 74 | 72 65 61 6d 28 20 6e 6f |teFromSt|ream( no|
|00002d50| 64 65 43 6c 61 73 73 2a | 20 69 6e 50 61 72 65 6e |deClass*| inParen|
|00002d60| 74 20 29 20 7b 0d 20 20 | 20 20 20 20 20 20 20 20 |t ) {. | |
|00002d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 09 09 09 09 | | ....|
|00002d80| 09 09 72 65 74 75 72 6e | 20 6e 65 77 20 54 28 20 |..return| new T( |
|00002d90| 69 6e 50 61 72 65 6e 74 | 20 29 3b 0d 20 20 20 20 |inParent| );. |
|00002da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 09 | | .|
|00002db0| 09 09 09 09 09 7d 0d 0d | 0d 09 09 73 74 61 74 69 |.....}..|...stati|
|00002dc0| 63 20 76 6f 69 64 09 09 | 09 09 09 09 52 65 67 69 |c void..|....Regi|
|00002dd0| 73 74 65 72 4e 6f 64 65 | 28 20 6c 6f 6e 67 20 69 |sterNode|( long i|
|00002de0| 6e 43 6c 61 73 73 49 44 | 20 29 20 7b 0d 20 20 20 |nClassID| ) {. |
|00002df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002e00| 20 20 09 09 09 09 09 09 | 6e 6f 64 65 43 6c 61 73 | ......|nodeClas|
|00002e10| 73 3a 3a 52 65 67 69 73 | 74 65 72 4e 6f 64 65 43 |s::Regis|terNodeC|
|00002e20| 6c 61 73 73 28 20 69 6e | 43 6c 61 73 73 49 44 2c |lass( in|ClassID,|
|00002e30| 20 28 43 72 65 61 74 6f | 72 46 75 6e 63 54 29 20 | (Creato|rFuncT) |
|00002e40| 43 72 65 61 74 65 46 72 | 6f 6d 53 74 72 65 61 6d |CreateFr|omStream|
|00002e50| 20 29 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | );. | |
|00002e60| 20 20 20 20 20 20 20 09 | 09 09 09 09 09 7d 0d 7d | .|.....}.}|
|00002e70| 3b 0d 0d 0d 23 65 6e 64 | 69 66 0d 0d 00 00 00 00 |;...#end|if......|
|00002e80| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00002e90| 25 53 00 08 25 6b 00 04 | 00 0c 25 6b 00 08 00 10 |%S..%k..|..%k....|
|00002ea0| 20 2c 21 0c 52 ac 21 0c | 25 40 00 04 22 03 44 81 | ,!.R.!.|%@..".D.|
|00002eb0| 0b 6e 6f 64 65 43 6c 61 | 73 73 2e 68 20 44 65 76 |.nodeCla|ss.h Dev|
|00002ec0| 65 66 73 6d 70 33 2e 6d | 70 33 77 6f 72 6c 64 2e |efsmp3.m|p3world.|
|00002ed0| 00 00 54 45 58 54 43 57 | 49 45 01 00 ff ff ff ff |..TEXTCW|IE......|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 ac 3d 3c 3a 00 00 | 2d d0 00 00 01 9a b0 ab |...=<:..|-.......|
|00002f00| 00 04 66 10 20 03 44 80 | 20 6c 21 10 21 aa 00 04 |..f. .D.| l!.!...|
|00002f10| 0c 00 60 4c 24 52 20 0a | 66 e0 60 0c 20 2c 21 18 |..`L$R .|f.`. ,!.|
|00002f20| 52 ac 21 18 27 40 00 04 | 48 78 00 10 61 ff ff fe |R.!.'@..|Hx..a...|
|00002f30| de b0 24 48 24 ac 21 68 | 29 4a 21 68 25 53 00 08 |..$H$.!h|)J!h%S..|
|00002f40| 25 6b 00 04 00 0c 20 2c | 21 0c 52 ac 21 0c 25 40 |%k.... ,|!.R.!.%@|
|00002f50| 00 04 22 03 44 81 20 6c | 21 10 21 80 1c 00 58 4f |..".D. l|!.!...XO|
|00002f60| 4c df 0c 08 4e 5e 4e 75 | 4e 56 ff fc 2f 0a 24 6e |L...N^Nu|NV../.$n|
|00002f70| 00 0c 2d 4a ff fc 14 fc | ff 86 14 fc ff 89 14 fc |..-J....|........|
|00002f80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00002f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fa0| 00 00 00 00 00 00 00 02 | 00 04 00 5b 00 08 02 48 |........|...[...H|
|00002fb0| 02 68 00 5b 00 08 02 48 | 02 68 b2 30 39 2f 00 00 |.h.[...H|.h.09/..|
|00002fc0| 06 98 00 00 06 98 00 00 | 05 cc 01 00 00 00 00 04 |........|........|
|00002fd0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00002fe0| 00 00 00 46 04 ee c5 84 | 14 34 00 00 00 1c 00 46 |...F....|.4.....F|
|00002ff0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00003000| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00003010| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00003020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+